a = int(input())
b = int(input())
print(f"{bin(a)} {bin(a)} {a&b}")